import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'home',
     component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue')
  }
]

const router = new VueRouter({
  mode:'history',
  // 访问的基础路径前缀（默认 /   如果是 /abc）  则为  http://www.xxx.com/abc/home 默认路径为/abc
  base:process.env.BASE_URL,
  routes 
})

export default router
